package com.qiangqiang.task.server.controller;

import com.qiangqiang.task.server.service.MessageService;
import com.qiangqiang.task.server.util.ResultVOUtil;
import com.qiangqiang.task.server.vo.ResultVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: task
 * @description:
 * @author: Sky.lin
 * @create: 2019-03-07 16:25
 **/
@RestController
@RequestMapping(value = "/message")
public class MessageController {
    @Autowired
    private MessageService messageService;

    @GetMapping("/showPageMessageByToId")
    public ResultVO showPageMessageByToId(@Param("toId") long toId) {
        return ResultVOUtil.success(messageService.findPageMessageByToId(toId));
    }
}
